#ifndef PVVLIST_HPP
#define PVVLIST_HPP



class PegVirtualVList : public PegWindow
{
    public:
        PegVirtualVList(const PegRect &Rect, PEGUSHORT Id = 0,
                  PEGULONG Style = FF_THIN|TJ_CENTER);

        virtual ~PegVirtualVList();

        virtual void AssignVirtualList(void *pList, PEGINT Count);
        virtual PEGINT GetSelectedIndex(void) { return mLastSelected; }
        virtual void GetVScrollInfo(PegScrollInfo *Put);

        virtual PEGINT Message(const PegMessage &Mesg);
        virtual void PageDown(void);
        virtual void PageUp(void);
        virtual void Resize(const PegRect &NewSize);
        virtual void ScrollIntoView(PEGINT Index, PEGBOOL Redraw = TRUE);
        virtual void SelectNext(void);
        virtual void SelectPrevious(void);

        virtual void SetCellHeight(PEGINT Height);
        virtual void SetFont(PEGUINT FontIndex);
        virtual void SetSelected(PEGINT Index);
        virtual void Unselect(PEGBOOL Redraw = TRUE);

    protected:

        virtual void AssignData(PEGINT ObjIdx, PEGINT ListIdx);
        virtual void AllocObjects(PEGINT NumObjects);
        virtual PegThing *ConstructObject(PegRect Rect, PEGINT Index);
        virtual void CreateListEntries();
        virtual void Select(PEGINT Index);

        PegThing **mpObjects;
        void *mpListData;
        PEGINT mLastSelected;
        PEGINT mNumObjects;
        PEGINT mNumEntries;
        PEGINT mTopEntry;
        PEGINT mCellHeight;
};





#endif
